<?php
ob_start();
//error_reporting(0);//hide error or warning
try{
    $file=fopen("setting.txt","r");

    $dynamic_url = fgets($file);
    $protocol="http://";
    $static_url="/ServiceRest.svc";
   
    //set server connection
    $url = $protocol.$dynamic_url.$static_url;
   // echo$url; 
    $_SESSION['basic_url'] = $url;
    
   // echo$url ; break;
    $ctx = stream_context_create(array('http' => array('timeout' => 50)));
    //print_r($url); break;
    $client = @file_get_contents($url,0,$ctx);

    
    ?>
    
    <?php
    
}catch(Exception $e){
    ?>

  
    <?php
   
    
}    
?>
